<div id="news">
<div>
    <div>
        Published: <input type="text" id="news_published" name="published" class="text" value="" />
        Expired: <input type="text" id="news_expired" name="expired" class="text" value="" />
    </div>
    <div>
        <b>Content:</b>
        <div id="news_content"><?php $this->write('content');?></div>
    </div>
</div>
</div>
<script type="text/javascript">
var news_published, news_expired;
z.addEvent(document.body, 'load', function () {
    news_published = z.s('news_published');
    news_expired = z.s('news_expired');
    
    <?php if ($this->has_data('published')):?>
    news_published.value = z.parseTime(new Date(<?php $this->write('published');?> * 1000));
    <?php endif;?>
    <?php if ($this->has_data('expired')):?>
    news_expired.value = z.parseTime(new Date(<?php $this->write('expired');?> * 1000));
    <?php endif;?>
});
/*
z.addEvent(document.body, 'load', function () {
    knm.add_require('template');
});

function template_changed(target) {
    knm.set('template', target.value);
}
)*/
</script>